<BODY>
<BR>
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
	<TR>
		<TD> <FORM NAME="open" METHOD="post">
		  <BR>
          <table width="750" border="0" align="center" cellpadding="4" cellspacing="0">
            <tr>
              <td bgcolor="#eeeeee"  style="cursor:hand;" onClick="sh('ref');"><strong><img name="imb_ref" id="imb_ref" src="images/cross_minus.gif" width="9" height="9" hspace="4"> Fund your account </strong></td>
            </tr>
          </table>
            <div id="dvb_ref" name="dvb_ref">
            <table width="750" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE">
              <tr>
                <td bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="0" cellpadding="1">
                  <tr>
                    <td align="center"><table  border="0" cellspacing="0" cellpadding="7">
                      <tr>
                        <td nowrap>Amount:</td>
                        <td><input name="amount" type="text" id="amount" size="5">
                          USD</td>
                      </tr>
                      <tr>
                        <td valign="top">Pay by: </td>
                        <td><table  border="0" cellspacing="0" cellpadding="1">
                            <? if ($cfg['use_2co']) { ?>
							<tr>
                              <td><input name="gate" type="radio" value="2co" checked>
                                  <img src="images/gate_2checkout.gif" width="188" height="26" align="absmiddle"></td>
                              <td>&nbsp;</td>
                              <td>(<? echo $cfg['2co_fee']; ?>% fee)</td>
                            </tr>
							<? } ?>
							<? if ($cfg['use_pp']) { ?>
                            <tr>
                              <td><input name="gate" type="radio" value="pp">
                                  <img src="images/gate_paypal.gif" width="188" height="26" align="absmiddle"></td>
                              <td>&nbsp;</td>
                              <td>(<? echo $cfg['pp_fee']; ?>% fee)</td>
                            </tr>
							<? } ?>
							<? if ($cfg['use_storm']) { ?>
                            <tr>
                              <td><input name="gate" type="radio" value="storm">
                                  <img src="images/gate_stormpay.gif" width="188" height="26" align="absmiddle"></td>
                              <td>&nbsp;</td>
                              <td>(<? echo $cfg['storm_fee']; ?>% fee)</td>
                            </tr>
							<? } ?>
                        </table></td>
                      </tr>
                      <tr>
                        <td>&nbsp;</td>
                        <td><input type="submit" name="Submit" value="Process to payment"></td>
                      </tr>
                    </table></td>
                    <td width="340" valign="top"><table width="100%" height="100%"  border="0" cellpadding="5" cellspacing="1" bgcolor="#EEEEEE">
                      <tr>
                        <td style="border-left:2px solid #eeeeee;" bgcolor="#EEEEEE">Account balance </td>
                      </tr>
                      <tr>
                        <td style="border-left:2px solid #eeeeee;" bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="0" cellpadding="1">
                          <tr>
                            <td>Current active balance:</td>
                            <td>$<? echo $total1; ?></td>
                          </tr>
                          <tr>
                            <td>Total deposited: </td>
                            <td>$<? echo $totalin; ?></td>
                          </tr>
                          <tr>
                            <td>Total spent: </td>
                            <td>$<? echo ($totalout < 0) ? 0 : $totalout ; ?></td>
                          </tr>
                        </table></td>
                      </tr>
                    </table></td>
                  </tr>
                </table></td>
              </tr>
            </table>
			</div>
          <br>
          <br>
          <table width="750" border="0" align="center" cellpadding="4" cellspacing="0">
            <tr>
              <td bgcolor="#eeeeee" style="cursor:hand;" onClick="sh('payments');"><strong><img name="imb_payments" id="imb_payments" src="images/cross_plus.gif" width="9" height="9" hspace="4"> Processed payments </strong></td>
            </tr>
          </table>
          <div id="dvb_payments" name="dvb_payments" style="<? echo "display:none;" ?>">
            <table width="750" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#EEEEEE">
              <tr>
                <td bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="0" cellpadding="4">
                    <tr>
                      <td>
					  <? if ($rspt) { ?>
					  <table width="100%"  border="0" cellspacing="0" cellpadding="3">
                        <tr bgcolor="#EEEEEE">
                          <td><strong>Date</strong></td>
                          <td><strong>Amount</strong></td>
                          <td><strong>Gate</strong></td>
                          <td><strong>Transaction ID </strong></td>
                        </tr>
						<?
						while($row = mysql_fetch_assoc($rsp))
						{
						?>
                        <tr>
                          <td><? echo date("m/d/y H:i:s", strtotime($row['dtpaid'])); ?></td>
                          <td><? echo $row['pamount']; ?></td>
                          <td><? echo $gato[$row['gate']]; ?></td>
                          <td><? echo $row['transid']; ?></td>
                        </tr>
						<? } ?>
                      </table>
					  <? } else { ?>
					  No payments proccessed yet <? } ?>
					  </td>
                    </tr>
                </table></td>
              </tr>
            </table>
          </div>
          <P>&nbsp;</P>
          <P>&nbsp;</P>
		  </FORM>
	</TD>
	</TR>
</TABLE>
